package com.my.config;

import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean;
import org.springframework.boot.context.properties.EnableConfigurationProperties;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

import com.my.app.code.CodeCreator;
import com.my.app.code.CodeCreatorProperties;
import com.my.framework.dao.DaoProperties;
import com.my.framework.dao.DbUtils;
import com.my.toolkit.template.TemplateUtil;
import com.my.utils.IdWorker;


@Configuration
@EnableConfigurationProperties({ CodeCreatorProperties.class })
public class CodeAutoConfiguration {

	CodeCreatorProperties properties;
	public CodeAutoConfiguration(CodeCreatorProperties properties) {
		this.properties=properties;
	}
	
	@Bean
	public CodeCreator codeCreator(TemplateUtil templateUtil) {
		return new CodeCreator(templateUtil, properties);
	}
}
